package com.ruoyi.web.controller.word;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.word.service.ICommonWordSimpleSentenceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/word/simpleSentence")
public class CommonWordSimpleSentenceController extends BaseController {

    @Autowired
    private ICommonWordSimpleSentenceService biz;

    @RequestMapping(value = "/findByWid/{wid}", method = RequestMethod.GET)
    public R find(@PathVariable Long wid) {
        try{
            return R.data(biz.findByWid(wid));
        }catch(Exception e){
            e.printStackTrace();
        }
        return R.fail();
    }
}
